package com.zxy.study.ui.activity;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.widget.Toast;

import com.zxy.study.R;
import com.zxy.study.ui.widget.TextTabLayout;

public class TextTabAvtivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_text_tab);

        TextTabLayout textTabLayout = findViewById(R.id.text_tab_layout);
        textTabLayout.setOnTextTabListener(new TextTabLayout.OnTextTabListener() {
            @Override
            public void onTabClick(int pos) {
                Toast.makeText(TextTabAvtivity.this,"选择了"+pos,Toast.LENGTH_SHORT).show();
            }
        });
    }
}
